package com.lkm.market2_0.m.steelyarddata;

import android.support.annotation.Nullable;

import com.lkm.frame.module.IModule;
import com.lkm.frame.task2.Task;
import com.lkm.javatool.lang.RunnablePR;
import com.lkm.market2_0.entity.ResponEntity;
import com.lkm.market2_0.m.steelyardserver.to.WeightChangeInfo;
import com.lkm.market2_0.entity.SteelyardInfo;

import java.util.List;




public interface SteelyardDataModule extends IModule{


    
    

    void steelyardHeartbeatCollect(String steelyardMac,long time,boolean isExceptions,String version,String steelyardNumno,float voltage);
    

    void AD(String steelyardMac, int ad,int zeroAD , int offsetZeroAD,int kValue);

    

    void weightChange(String steelyardMac, WeightChangeInfo weightChangeInfo);

    

    void regSteelyardValue(SteelyardValue steelyardValue);

    SteelyardValue getSteelyardValue(String steelyardMac);

    

    


    

    @Nullable
    List<OrderEntity.GoodEntity> getGoodEntities(String steelyardMac);


    

    int removeGoodEntities(String steelyardMac,int index);

    void removeAllGoodEntities(String steelyardMac);

    

    

    @Deprecated 
    void saveLastWeightChangeToOrderEntity(String steelyardMac);


    

    

    OrderEntity.GoodEntity getCurWeightChangeGood(String steelyardMac);

    

    OrderEntity.GoodEntity regLastWeightChangeToOrderGood(String steelyardMac);

    

    boolean subtotal(String steelyardMac, OrderEntity.GoodEntity goodEntity);

    

    OrderEntity onlyCreateOrderEntity(String steelyardMac, RunnablePR<String ,String> orderHanler);

    

    void saveOrderEntity(String steelyardMac,OrderEntity orderEntity);

    

    void clearSaleCacheInfo(String steelyardMac);
    

    OrderEntity print(String steelyardMac,boolean isSalesJoin);
    


    
    

    SteelyardInfo getSteelyardInfo(String steelyardMac);

    

    void regSteelyardInfo(SteelyardInfo steelyardInfo);


    

    Task<String,String, ResponEntity<SteelyardInfo>> LoadSteelyardInfoForS(final String steelyardMac) ;

     

    

    void replaceCurName(String goodsName);
}
